#version 460
#extension GL_GOOGLE_include_directive : enable
#extension GL_EXT_shader_explicit_arithmetic_types_int64 : require

#include "../../../../core/shader_binding_ID.h"
#include "../../../../core/shader_std.h"
#include "../../../../core/shader_built_in_functions.h"
#include "../../../../core/shader_taster_transform.h"
#include "../../../../core/shader_taster_color.h"
#include "../../../../core/shader_taster_line.h"



layout(location = 0) in vec3 inMinimum;
layout(location = 1) in vec3 inMaximum;


layout(location = 0) out vec4 vColor;
layout(location = 1) out uint vPrimitiveID;

layout(location = 2) out vec3 outMinimum;
layout(location = 3) out vec3 outMaximum;
layout(location = DEF_BINDING_LocationBindID_RotMat) out mat4 vTranformMat;



void main(void){
	mat4 bonesMat_som = mat_Model[gl_InstanceIndex + drawProp.MatrixOffset];
	vColor = f_glsl_buildColor(InstanceColor[gl_InstanceIndex + drawProp.ColorPropOffset]);
	vPrimitiveID = gl_VertexIndex;
	
	vTranformMat = mat_ProjecView[0];
	
	
	outMinimum = (bonesMat_som * vec4(inMinimum, 1)).xyz;
	outMaximum = (bonesMat_som * vec4(inMaximum, 1)).xyz;
}

